package com.mapper;

import com.domain.Admin;
import com.domain.User;
import org.apache.ibatis.annotations.*;

@Mapper
public interface AdminMapper {
    @Select("SELECT * FROM t_admin WHERE id =#{id}")
    public Admin findById(Integer id);
    @Insert("INSERT INTO t_Admin(admin_name,pwd)"+"VALUES(#{adminName},#{pwd})")
    public int insertAdmin(Admin admin);
    @Update("UPDATE t_Admin SET admin_name=#{adminname} WHERE id=#{id}")
    public int updateAdmin(Admin admin);
    @Delete("DELETE FROM t_Admin WHERE id=#{id}")
    public Admin deleteAdmin(Integer id);
    @Select("SELECT * FROM t_admin WHERE admin_name=#{adminName} and pwd=#{pwd}")
    public Admin userLogin(Admin admin);
}
